// 背诵单词模块
export default {
  namespaced: true,
  state () {
    return {
      // 所选择需要背诵的单词
      testSelection: [],
      // 记录闯关后每个单词的得分
      score: [],
      errorWords: [],
      starMsg: []
    }
  },
  mutations: {
    // 将选择的单词保存至vuex以便在答题页面渲染
    setTest (state, payload) {
      state.testSelection = payload
    },
    setScore (state, payload) {
      state.score = payload
    },
    setErrorwords (state, payload) {
      state.errorWords = payload
    },
    setStarmsg (state, payload) {
      state.starMsg = payload
    }
  }
}
